package com.breez.aiauth.common.config;

import com.baidu.aip.face.AipFace;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AipFaceConfig {
    @Value("${aiauth.app_id}")
    public String app_id;
    @Value("${aiauth.api_key}")
    public String api_key;
    @Value("${aiauth.secret_key}")
    public String secret_key;
    @Bean
    public AipFace client() {
        AipFace client = new AipFace(app_id, api_key, secret_key);
        client.setConnectionTimeoutInMillis(2000);
        client.setSocketTimeoutInMillis(60000);
        return client;
    }
}
